home *** CD-ROM | disk | FTP | other *** search
/ Workbench Design / WB Collection.iso / datatypes / dfadt / source / dfadt.h < prev    next >
C/C++ Source or Header  |  1996-04-07  |  3KB  |  147 lines

  1. #ifndef DFADT_H
  2. #define DFAFT_H
  3.  
  4. #define DFADTPREFS        "ENV:DFADT.prefs"
  5.  
  6. #define G(o)        ((struct Gadget *) (o))
  7.  
  8. #define PUDDLE_SIZE        (8 * 1048)
  9. #define TRESH_SIZE        1024
  10. #define BUFFER_SIZE        1024
  11. #define BACKSPACE        '\010'
  12. #define EOS                '\0'
  13.  
  14. #define MAX(a,b)        ((a>b)?a:b)
  15.  
  16.     // ********************************************
  17.     // First address file line contains a "magic...
  18.     // ********************************************
  19.  
  20.     // The length of the 'magic' MUST be the same for every version!!!
  21.  
  22. #define DFAMAGICLEN    (strlen(DFAMAGIC))
  23.  
  24.     // Address file for DFA V1.0
  25.  
  26. #define    DFAMAGIC    "DFAddress1.0"
  27. #define DFALINES    13
  28.  
  29.     // Address file for DFA V1.1
  30.  
  31. #define    DFA11MAGIC    "DFAddress1.1"
  32. #define DFA11LINES    15
  33.  
  34.     // Notice: DFA V1.2x had no new address file format !!!
  35.  
  36.     // Address file for DFA V1.3
  37.  
  38. #define    DFA13MAGIC    "DFAddress1.3"
  39. #define DFA13LINES    16
  40.  
  41.     // Address file for DFA V1.4
  42.  
  43. #define    DFA14MAGIC    "DFAddress1.4"
  44. #define DFA14LINES    18
  45.  
  46.     // Address file for DFA V1.5
  47.  
  48. #define    DFA15MAGIC        "DFAddress1.5"
  49. #define DFA15LINES        19
  50.  
  51.     // **********
  52.     // Offsets...
  53.     // **********
  54.  
  55. #define ITEMOFFSET_SALUTATION    0
  56. #define ITEMOFFSET_FIRSTNAME    1
  57. #define ITEMOFFSET_NAME            2
  58. #define ITEMOFFSET_CO            3
  59. #define ITEMOFFSET_STREET        4
  60. #define ITEMOFFSET_ZIP            5
  61. #define ITEMOFFSET_CITY            6
  62. #define ITEMOFFSET_STATE        7
  63. #define ITEMOFFSET_COUNTRY        8
  64. #define ITEMOFFSET_BIRTHDAY        9
  65. #define ITEMOFFSET_PHONE        10
  66. #define ITEMOFFSET_FAX            11
  67. #define ITEMOFFSET_EMAIL1        12
  68. #define ITEMOFFSET_EMAIL2        13
  69. #define ITEMOFFSET_EMAIL3        14
  70. #define ITEMOFFSET_COMMENT        15
  71. #define ITEMOFFSET_GROUP1        16
  72. #define ITEMOFFSET_GROUP2        17
  73. #define ITEMOFFSET_GROUP3        18
  74. #define ITEMOFFSET_GROUP4        19
  75. #define ITEMOFFSET_GROUP5        20
  76. #define ITEMOFFSET_GROUP6        21
  77. #define ITEMOFFSET_GROUP7        22
  78. #define ITEMOFFSET_GROUP8        23
  79. #define ITEMOFFSET_SELECTED        24
  80. #define ITEMOFFSET_EXTERNAL        25
  81.  
  82. #define ITEMOFFSET_NUM            26
  83.  
  84.  
  85.     // *************
  86.     // Structures...
  87.     // *************
  88.  
  89.     // Address entry
  90.  
  91. struct AData
  92. {
  93.     UBYTE            * ad_Salutation;
  94.     UBYTE            * ad_Name;
  95.     UBYTE            * ad_FirstName;
  96.     UBYTE            * ad_Street;
  97.     UBYTE            * ad_CO;
  98.     UBYTE            * ad_ZIP;
  99.     UBYTE            * ad_City;
  100.     UBYTE            * ad_State;
  101.     UBYTE            * ad_Country;
  102.  
  103.     UBYTE            * ad_Birthday;
  104.  
  105.     UBYTE            * ad_Phone;
  106.     UBYTE            * ad_Fax;
  107.  
  108.     UBYTE            * ad_EMail1;
  109.     UBYTE            * ad_EMail2;
  110.     UBYTE            * ad_EMail3;
  111.  
  112.     UBYTE            * ad_Comment;
  113.  
  114.     UBYTE            * ad_External;
  115.  
  116.     LONG            ad_Groups[8];
  117.  
  118.     LONG            ad_Selected;
  119. };
  120.  
  121. struct Address
  122. {
  123.     struct Node        as_Node;
  124.  
  125.     UWORD            as_PadDummy;
  126.  
  127.     struct AData    as_Data;
  128. };
  129.  
  130.  
  131. struct DDTData
  132. {
  133.     APTR            ddt_Pool;
  134.     UWORD            ddt_PadDummy;
  135.  
  136.     struct List        ddt_List;
  137. };
  138.  
  139. struct FIELDDESC
  140. {
  141.     LONG    offset;
  142.     char    * description;
  143.     LONG    length;
  144. };
  145.  
  146. #endif
  147.